"use strict";

let fs = require('fs');
let path = require('path');

let redis = require('../redis.js').redis;

redis.lua(
    'myset',
    'return redis.call("set",KEYS[1],KEYS[2])'
);

let fun = 'return redis.call("set",KEYS[1],KEYS[2])';
redis.lua('fun', fun);

let add = fs.readFileSync(path.join(__dirname, 'add.lua'), 'utf8');
redis.lua('add', add);

let distance = fs.readFileSync(path.join(__dirname, 'distance.lua'), 'utf8');
redis.lua('distance', distance);

module.exports = redis;

